<!DOCTYPE html>
<html>
  <head>
    <title>ClientA</title>
  </head>
  <body>
    <h1>ClientA</h1>
    <ul>
      <button onclick="setCookies()">setCookies</button>
      <button onclick="test()">test</button>
    </ul>
  <script type="text/javascript">
    function setCookies() {
      fetch("http://localhost:3000/server/login", {
        method: "post",
        credentials: "include",
        body: {}
      }).then(res => {
        alert("设置成功"+res)
      }).catch(err => {
        alert("设置失败"+res)
      })
    }
    function test() {
      fetch("http://localhost:3000/server/list",
      {
        method: "get",
        credentials: "include"
      }).then(res => {
        alert("设置成功"+res)
      }).catch(err => {
        alert("设置失败"+res)
      })
    }
  </script>
  </body>
</html>
